Skip to content

Fix Dag detail page 500 for Dags without a fileloc #69035#69110

Merged
pierrejeambrun merged 2 commits into
apache:mainfrom
haseebmalik18:fix-dag-detail-500-null-fileloc
Jun 30, 2026
Merged

Fix Dag detail page 500 for Dags without a fileloc #69035#69110
pierrejeambrun merged 2 commits into
apache:mainfrom
haseebmalik18:fix-dag-detail-500-null-fileloc

Conversation

@haseebmalik18

@haseebmalik18 haseebmalik18 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

DagModel.fileloc is nullable, but DAGResponse typed it as fileloc: str. So a Dag that has runs but a null fileloc (for example one run through dag.test() or the system-test harness) made GET /dags/{id} and /dags/{id}/details fail validation and return 500, leaving the detail page stuck loading.

This makes fileloc nullable so those endpoints return 200 and the page renders the Dag with its runs. The OpenAPI spec, UI client, and airflow-ctl datamodels are regenerated to match, and the UI handles a missing file location.

closes: #69035

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks

@pierrejeambrun pierrejeambrun added the type:bug-fix Changelog: Bug Fixes label Jun 30, 2026
@pierrejeambrun

Copy link
Copy Markdown
Member

Merging, unrelated CI failures on celery provider

@pierrejeambrun pierrejeambrun merged commit 7790bb5 into apache:main Jun 30, 2026
281 of 285 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Backport failed to create: airflow-ctl/v0-1-test. View the failure log Run details

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
airflow-ctl/v0-1-test Commit Link

You can attempt to backport this manually by running:

cherry_picker 7790bb5 airflow-ctl/v0-1-test

This should apply the commit to the airflow-ctl/v0-1-test branch and leave the commit in conflict state marking
the files that need manual conflict resolution.

After you have resolved the conflicts, you can continue the backport process by running:

cherry_picker --continue

If you don't have cherry-picker installed, see the installation guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:airflow-ctl area:API Airflow's REST/HTTP API area:UI Related to UI/UX. For Frontend Developers. backport-to-airflow-ctl/v0-1-test type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: DAG detail page 500s / infinite load for DAGs with run history but no parsed definition (e.g. created by dag.test()/system tests)

3 participants